﻿<catel:UserControl x:Class="Catel.Articles._02___WPF_controls.UI.Controls.PersonSummary"
                   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                   xmlns:ViewModels="clr-namespace:Catel.Articles._02___WPF_controls.UI.ViewModels"
                   xmlns:catel="http://catel.codeplex.com"
                   x:TypeArguments="ViewModels:PersonSummaryViewModel">

    <!-- Resources -->
    <UserControl.Resources>
        <!-- Converters -->
        <catel:FormattingConverter x:Key="FormattingConverter" />
    </UserControl.Resources>

    <!-- Content -->
    <Border BorderThickness="1" BorderBrush="Gray" Margin="0">
        <DockPanel Margin="0">
            <!-- Person photo -->
            <Border DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="0,0,4,0">
                <Image Source="{Binding PassportPhoto}" Stretch="Uniform" Width="90" Height="120" />
            </Border>

            <!-- Person info -->
            <StackPanel Width="150">
                <!-- First name -->
                <Label Content="{Binding FirstName}" />

                <!-- Middle name -->
                <Label Content="{Binding MiddleName}" />

                <!-- Last name -->
                <Label Content="{Binding LastName}" />

                <!-- Birthday -->
                <Label Content="{Binding Birthday, Converter={StaticResource FormattingConverter}, ConverterParameter='d'}" />
            </StackPanel>
        </DockPanel>
    </Border>

</catel:UserControl>